project ( libCLAP )

add_subdirectory ( CLAP )
add_subdirectory ( Common )
add_subdirectory ( test )

add_library ( CLAP SHARED
              CLAP/CLI.cpp
              CLAP/Exception.cpp
              CLAP/ExecutionPlan.cpp
              CLAP/Option.cpp
              CLAP/Stage.cpp
              CLAP/SubCommand.cpp
              CLAP/Switch.cpp
              Common/Exception.cpp )

add_test ( test1 test/cli -1 c1 -2stuff c2 )
set ( CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG" )
set ( CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG" )
set ( CMAKE_C_FLAGS_DEBUG "-g -DDEBUG" )
set ( CMAKE_CXX_FLAGS_RELEASE "-O2 -fPIC" )
set ( CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" )
include_directories ( ${libCLAP} )
link_directories ( ${libCLAP} )
enable_testing ()
